let str1 = 'Hello TS'

const str2: "Hello TS" = 'Hello TS'

let name: '吕布' | '张飞' = '吕布'

// 字面量：正如你看到的那样
// const arr1 = []
// const arr2 = new Array()

// const obj1 = {}
// const obj2 = new Object()

// const str11 = '11'
// const str22 = new String('11')

type TDir = 'up' | 'down' | 'left' | 'right'
const changeDirection = (dir: TDir) => {}
changeDirection('left')


type Action = {
  type: 'TODO_ADD' | 'TODO_DEL' | 'TODO_CHANGE' | 'TODO_FIND'
}

function reducer(action: Action) {
  switch(action.type) {
    // 写 case 的时候具备明确的提示
    case 'TODO_CHANGE':
  }
}

export { }